Stack Size Analysis for Interrupt - driven Programs 1
نویسندگان
چکیده
We study the problem of determining stack boundedness and the exact maximum stack size for three classes of interrupt-driven programs. Interrupt-driven programs are used in many real-time applications that require responsive interrupt handling. In order to ensure responsiveness, programmers often enable interrupt processing in the body of lower-priority interrupt handlers. In such programs a programming error can allow interrupt handlers to be interrupted in a cyclic fashion to lead to an unbounded stack, causing the system to crash. For a restricted class of interrupt-driven programs, we show that there is a polynomial-time procedure to check stack boundedness, while determining the exact maximum stack size is PSPACE-complete. For a larger class of programs, the two problems are both PSPACE-complete, and for the largest class of programs we consider, the two problems are PSPACE-hard and can be solved in exponential time. While the complexities are high, our algorithms are exponential only in the number of handlers, and polynomial in the size of the program.
منابع مشابه
Stack Size Analysis for Interrupt-Driven Programs
We study the problem of determining stack boundedness and the exact maximum stack size for three classes of interrupt-driven programs. Interrupt-driven programs are used in many real-time applications that require responsive interrupt handling. In order to ensure responsiveness, programmers often enable interrupt processing in the body of lower-priority interrupt handlers. In such programs a pr...
متن کاملSIMPLIFYING CONCURRENT PROGRAMMING IN SENSORNETS WITH THREADING pdfauthor
Wireless sensor networks (sensornets) are deeply embedded, resource constrained, distributed systems. Sensornets are generally developed in an interrupt(or event-) driven programming model. Writing event-driven programs is hard. Sensornets are generally battery powered, desiring event-driven executions, for power efficiency. This thesis presents TinyThread a safe, lightweight threading model wh...
متن کاملA Typed Interrupt Calculus
Most real-time systems require responsive interrupt handling. Programming of interrupt handlers is challenging: in order to ensure responsiveness, it is often necessary to have interrupt processing enabled in the body of lower priority handlers. It would be a programming error to allow the interrupt handlers to interrupt each other in a cyclic fashion; it could lead to an unbounded stack. Until...
متن کاملOptimizing Interrupt-Driven Embedded Software
Software for embedded microcontroller units (MCUs) represents both an interesting opportunity and a difficult challenge for compiler optimization. Since these systems tend to be small—often limited to a few KB of on-chip RAM—highly aggressive techniques are feasible and worthwhile. On the other hand, the effectiveness of traditional dataflow analyses is limited by their inability to cope with i...
متن کاملAn Accelerated Implementation of Portals on the Cray SeaStar
This paper describes an accelerated implementation of the Portals data movement layer on the Cray SeaStar used in the XT3 platform. The current supported implementation of Portals is interrupt-driven and does not take full advantage of the embedded processor on the SeaStar. The accelerated implementation offloads a significant portion of the network protocol stack to the SeaStar, providing sign...
متن کامل